package com.coldchain.hz.entity;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fangliai.core.entitiy.BaseSearch;
import org.apache.commons.lang3.StringUtils;

public class AddressSearch extends BaseSearch<ReceivedAddr> {
    private Integer type;
    private String companyId;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    @Override
    public QueryWrapper initWrapper() {
        QueryWrapper queryWrapper=new QueryWrapper();
        if(!StringUtils.isEmpty(companyId)){
            queryWrapper.eq("companyId",companyId);
        }
        if(type!=null){
            queryWrapper.eq("type",type);
        }
        return queryWrapper;
    }
}
